package com.globallogic.university.people;

import com.globallogic.university.documents.Curriculum;

/**
 * Class represents a student.
 * 
 * @author vladyslav.bachurin
 *
 */
public class Student extends Person {
	
	public Student(String firstName, String lastName) {
		super(firstName, lastName);
	}

	private Curriculum studentCurriculum;

	@Override
	public String toString() {
		return "Student [studentCurriculum=" + studentCurriculum
				+ ", toString()=" + super.toString() + ", getFirstName()="
				+ getFirstName() + ", getLastName()=" + getLastName()
				+ ", getDateOfBirth()=" + getDateOfBirth()
				+ ", getPlaceOfBirth()=" + getPlaceOfBirth() + ", getClass()="
				+ getClass() + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime
				* result
				+ ((studentCurriculum == null) ? 0 : studentCurriculum
						.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Student other = (Student) obj;
		if (studentCurriculum == null) {
			if (other.studentCurriculum != null)
				return false;
		} else if (!studentCurriculum.equals(other.studentCurriculum))
			return false;
		return true;
	}

	public Curriculum getStudentCurriculum() {
		return studentCurriculum;
	}

	public void setStudentCurriculum(Curriculum studentCurriculum) {
		this.studentCurriculum = studentCurriculum;
	}
	
	
}
